<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<title>{$title}</title>
		<link rel="stylesheet" href="/pc/layui/css/layui.css" />
		<link rel="stylesheet" href="/mobile/css/mobile.css" />
		<script src="/mobile/js/jquery.min.js"></script>
		<script src="/mobile/js/jquery.easing.min.js"></script>
		<script src="/mobile/js/TouchSlide.1.1.js"></script>
		<script src="/pc/layui/layui.js"></script>
	</head>
	<body>

		<div class="main">
			<img src="{$banner.image}" style="width: 100%; height: auto;" >
		</div>
		<div class="gap"></div>
		<div class="main" style="padding-top: 15px;">
			<div class="center_form">
						<form class="layui-form" action="">
							<div class="layui-form-item" >

								<select lay-filter="demo-select-filter" id="type">
									<option value="0" {if($type==0)}selected{/if}>专有技术认定</option>
									<option value="1" {if($type==1)}selected{/if}>专业技能培训</option>
								</select>

							</div>
							<div class="layui-form-item">

								<input type="search" id="keyword" lay-verify="required" placeholder="{if($type==0)}输入完成单位/认定编号/技术名称{else/}输入证书编号/身份证号{/if}"
									autocomplete="off" class="layui-input">

							</div>

						</form>
						<div class="btn" style="margin-top:30px;">
							<button type="button"
								class="layui-btn layui-btn-lg layui-btn-fluid layui-btn-normal layui-btn-radius"
								onclick="submit()">查询</button>
						</div>

						{if($rs==='')}
						<div style="text-align: center;">
							<img src="/pc/img/ico_zhengshuchaxun.png" style="width: 200px; height:auto;">
							<p style="text-align: center;">请输入关键字查询证书</p>
						</div>
						{elseif(!is_null($rs)) /}
							{if($type==0)}
								<div class="zhengshuchaxun_result">
									<div>认定编号：{$rs.rendingbianhao}</div>
									<div>技术名称：{$rs.jishumingcheng}</div>
									<div>完成单位：{$rs.wanchengdanwei}</div>
									<div>参与人：{$rs.canyuren}</div>
									<div>有效期：{$rs.youxiaoqi}</div>
								</div>
							{else /}
								<div class="zhengshuchaxun_result">
									<div>证书编号：{$rs.zhengshubianhao}</div>
									<div>培训名称：{$rs.peixunmingcheng}</div>
									<div>姓名：{$rs.xingming}</div>
									<div>性别：{$xingbie_arr[$rs.xingbie]}</div>
									<div>身份证号：{$rs.shenfenzhenghao}</div>
									<div>结业时间：{$rs.jieye_date}</div>
									<div>成绩：{$rs.chengji}</div>
								</div>
							{/if}
						{else /}
							<div style="text-align: center;">
								<img src="/mobile/img/ico_empty.png" style="width: 200px; height:auto;">
								<p style="text-align: center;">没有查询到相关数据</p>
							</div>

						{/if}

					</div>
		</div>

		{include file="common/footer"}
	</body>
	<script type="text/javascript">
		layui.use(function(){
    	  var form = layui.form;
    	  var layer = layui.layer;
    	  // select 事件
    	  form.on('select(demo-select-filter)', function(data){
    	    //var elem = data.elem; // 获得 select 原始 DOM 对象
    	    var value = data.value; // 获得被选中的值
    	    //var othis = data.othis; // 获得 select 元素被替换后的 jQuery 对象

    	    //layer.msg(this.innerHTML + ' 的 value: '+ value); // this 为当前选中 <option> 元素对象
    		window.location.href="{:url('zhengshu/index')}?type="+value;
    	  });
    	});

    	function submit(){
    	    if($('#keyword').val().trim()==''){
    	        layer.msg('请输入查询内容')
    	        return false;
    	    }
    		window.location.href="{:url('zhengshu/index')}?type="+$('#type').val()+'&keyword='+$('#keyword').val().trim();
    	}
	</script>
</html>
